package org.nalai.owlink;

@SuppressWarnings("unused")
public class Node<T> {

    private T data;
    private Node<T> next;

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public Node<T> getNext() {
        return next;
    }

    public void setNext(Node<T> next) {
        this.next = next;
    }

    @Override
    public int hashCode() {
        return this.getData().hashCode();
    }

    @Override
    public boolean equals(Object obj) {
        return obj instanceof Node && this.getData().equals(((Node) obj).getData());
    }

    @Override
    public String toString() {
        return this.getData().toString();
    }
}
